import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_app_study/utils/ImageUtil.dart';
import 'package:flutter_app_study/utils/ScreenAdapter.dart';
import 'package:flutter_app_study/view/TextDrawWiget.dart';

class ShareDialogWidget extends StatelessWidget {
  Function(int index) onclick;

  ShareDialogWidget(this.onclick);

  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: 10),
      child: Column(
        children: <Widget>[
          Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: <Widget>[
              InkWell(
                child: TextDrawWidget(
                  "QQ",
                  pic: ImageUtil.getImageAsset("qq.png"),
                  drawGravity: Gravity.top,
                  drawPadding: ScreenAdapter().setWidth(10),
                ),
                onTap: () {
                  onclick(0);
                },
              ),
              InkWell(
                child: TextDrawWidget(
                  "微信",
                  pic: ImageUtil.getImageAsset("weixing.png"),
                  drawGravity: Gravity.top,
                  drawPadding: ScreenAdapter().setWidth(10),
                ),
                onTap: () {
                  onclick(1);
                },
              ),
            ],
          ),
          InkWell(
            child: Container(
              child: Text("取消"),
              padding: EdgeInsets.all(10),
            ),
            onTap: (){
              onclick(2);
            },
          ),
        ],
      ),
    );
  }
}
